package it.giuseppetrisciuoglio.lyrics.persistence.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Version;

@Entity
@Table(name = "TB_META_INFO_ALBUM")
public class MetaDataInfoAlbum extends CommonClass {

	public static final String TIPO_ALBUM_RELEASE_DATE 	= "album-release-date";
	public static final String TIPO_ALBUM_LASTFM_URL 	= "album-lastfm-url";
	public static final String TIPO_ALBUM_COVER_URL 	= "album-cover-url";
	public static final String TIPO_ALBUM_LABEL_NAME	= "album-label";
	public static final String TIPO_ALBUM_LABEL_URL 	= "album-label-url";

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "NUM_META_DATA_ALBUM")
	Long id;

	@ManyToOne(fetch = FetchType.LAZY, optional = false)
	@JoinColumn(name = "NUM_ALBUM")
	Album album;

	@Column(name = "TXT_TIPO")
	String tipo;

	@Column(name = "TXT_VALORE")
	String valore;

	@Version
	@Column(name = "NUM_VERSION")
	Long version;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getTipo() {
		return tipo;
	}

	public void setTipo(String tipo) {
		this.tipo = tipo;
	}

	public String getValore() {
		return valore;
	}

	public void setValore(String valore) {
		this.valore = valore;
	}

	public Long getVersion() {
		return version;
	}

	public void setVersion(Long version) {
		this.version = version;
	}

	public Album getAlbum() {
		return album;
	}

	public void setAlbum(Album album) {
		this.album = album;
	}

}
